<?php

/**
 * This is the model class for table "{{user}}".
 *
 * The followings are the available columns in table '{{user}}':
 * @property integer $id
 * @property string $account
 * @property string $nickname
 * @property string $pwd
 * @property string $md5pwd
 * @property string $ip
 * @property string $reg_location
 * @property string $headimg
 * @property integer $sex
 * @property string $birthday
 * @property integer $ismarriage
 * @property integer $degree
 * @property string $liveplace
 * @property string $hometown
 * @property string $sign
 * @property string $create_time
 * @property string $update_time
 */
class User extends CActiveRecord{
	
	public $mobile2;
	
	public static function model($className=__CLASS__){
		return parent::model($className);
	}

	public function tableName(){
		return '{{user}}';
	}

	public function rules(){
		return array(
			array('sex, ismarriage, degree', 'numerical', 'integerOnly'=>true),
			array('account, pwd, reg_location, headimg', 'length', 'max'=>30),
			array('nickname', 'length', 'max'=>15),
			array('md5pwd, liveplace, hometown', 'length', 'max'=>50),
			array('ip', 'length', 'max'=>20),
			array('sign', 'length', 'max'=>140),
			array('birthday, create_time, update_time, mobile, ismobileverify, mobileverifycode, mobileverifycodetime, point', 'safe')
		);
	}

	public function relations(){
        return array();
	}
}